﻿@model  LanguageModel
 
@{

    ViewBag.Title =  T("Admin.Configuration.Languages").Text;
    var g = Html.GridToolKit();
    var grid = g.DataGrid("otable", g.Param(x => x.Id)).TableId("table-id").GridKey("Id").Pager(false)
    .MainGrid(
    g.GridColumn(x => x.Name, 300).DefaultContent("<a href=\"Edit/#Id#\">#Name#</a>"),
    g.GridColumn(x => x.LanguageCulture, 300),    
    g.GridColumn("Resources", T("Admin.Configuration.Languages.Resources.View").Text, 100).DefaultContent("<a href=\"Resources?languageId=#Id#\">#Name#</a>"),
    g.GridColumn(x => x.DisplayOrder, 300),
    g.GridColumn(x => x.Published, 300))
    .Url(Url.Action("List", "Language")).DefaultTableClass();
}
<script type="text/javascript">
    $(document).ready(function () {
        @(grid)
    });
</script>
 

<div class="row">
    <div class="col-md-12">
        <div class="portlet light">
            <div class="section-header sticky">
                <div class="caption">
                    <i class="icon-equalizer font-red-sunglo"></i>
                    <span class="caption-subject font-red-sunglo bold uppercase">  @T("Admin.Configuration.Languages")</span>
                    <span class="caption-helper"></span>
                </div>
                <div class="tools">

                </div>
                <div class="actions">
                    <a href="@Url.Action("Create")" class="btn yellow"><i class="fa fa-plus"></i>@T("Admin.Common.AddNew") </a>

                </div>
            </div>
            <div class="portlet-body flip-scroll">
                <table id="@grid.GetTableId" class="@grid.GetDefaultTableClass" @Html.Raw(grid.GetFixedLayout ? "style='table-layout:fixed'" : "")>
                    <thead>
                        <tr>
                            @foreach (var column in grid.GetColumns)
                            {
                                if (column.Name == "操作")
                                {

                                    <th class="@column.CssClassHeader">@column.DisplayName</th>

                                }
                                else if (column.DisplayName == null)
                                {

                                    <th class="@column.CssClassHeader"><input type="checkbox" class="group-checkable" data-set="checkboxes">@T("Admin.Configuration.ActivityLog.ActivityLogType.Fields.Enabled")</th>
                                }
                                else
                                {
                                    <th class="@column.CssClassHeader">@column.DisplayName</th>
                                }

                            }
                        </tr>

                    </thead>
                    <tbody></tbody>
                </table>
            </div>
        </div>
    </div>
</div>



